﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SearcheAndReports.master" AutoEventWireup="true"
    CodeBehind="Search.aspx.cs" Inherits="SCFHS.Views.Searchs.Search" %>

<asp:Content ID="Content1" ContentPlaceHolderID="NastedHead" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Search").addClass("createOrderMenuactive");
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NastedBody" runat="server">
    <div id="search">
        <div class="row Box radius-Bottom">
            <div class="ContentTitle">
                مدخلات البحث
            </div>
            <div class="row">
                <ul class="title">
                    <li>إسم صاحب الطلب</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox runat="server" ID="txtPersonNameToSearch" Font-Size="16" MaxLength="80" /></li>
                </ul>
                <ul class="title" style="border-left: 3px solid red; font-size: 20px; font-weight: bold;">
                    <li>أو</li>
                </ul>
                <ul class="title">
                    <li>رقم الطلب</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox runat="server" ID="txtOrderNumberToSearch" Font-Size="16" CssClass="ltrNumbers"
                            Width="100" MaxLength="20" /></li>
                </ul>
                 <ul class="title" style="border-left: 3px solid red; font-size: 20px; font-weight: bold;">
                    <li>أو</li>
                </ul>
                <ul class="title">
                    <li>رقم التصنيف</li>
                </ul>
                <ul class="data">
                    <li>
                        <asp:TextBox runat="server" ID="txtClassificationNumber" Font-Size="16" CssClass="ltrNumbers"
                            Width="100" MaxLength="20" /></li>
                </ul>
            </div>
        </div>
        <div class="ProgressContent">
            <asp:Button ID="btnSearch" Text="بحث" runat="server" Width="120" CssClass="button"
                OnClick="btnSearch_Click" />
        </div>
        <div class="row Box radius-Bottom" id="searchResult" runat="server" visible="false">
            <div class="ContentTitle">
                نتائج البحث
            </div>
            <div style="width: 100%; padding: 10px 0 10px;">
                <center>
                    <asp:GridView runat="server" ID="grdSearchResult" AutoGenerateColumns="False" CellPadding="4"
                        ForeColor="#333333" GridLines="Both" BorderWidth="2" DataKeyNames="ID">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="م">
                                <ItemTemplate>
                                    <div style="width: 19px; text-align: center">
                                        <%#Container.DataItemIndex+1 %>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="رقم الطلب" ItemStyle-Width="120">
                                <ItemTemplate>
                                    <%# Eval("OrderNumber")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="صاحب الطلب" ItemStyle-Width="250">
                                <ItemTemplate>
                                    <%# Eval("PersonName")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="رقم التصنيف" ItemStyle-Width="150">
                                <ItemTemplate>
                                    <%# Eval("OrderClassificationNumber")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="تاريخ الطلب" ItemStyle-Width="100">
                                <ItemTemplate>
                                    <%# String.Format("{0:dd/MM/yyyy}", Eval("OrderCreatedOn"))%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="حالة الطلب" ItemStyle-Width="100">
                                <ItemTemplate>
                                    <%#parseOrderStateAr(Eval("OrderState").ToString())%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ItemStyle-Width="78" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton Text="التفاصيل" runat="server" CommandArgument=' <%# Eval("ID")%>'
                                        OnClick="btnDetails_Click" ID="btnDetails" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="78px"></ItemStyle>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <EmptyDataTemplate>
                            <asp:Label ID="Label1" Text=" عفوا لا توجد نتائج للبحث" runat="server"
                                Width="500px" />
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle ForeColor="White" Font-Bold="true" BorderStyle="None" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </center>
            </div>
        </div>
    </div>
</asp:Content>
